package com.cmc.cloud.cmclink.doc.vo.blnolocalchargevo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Objects;

/**
 * Local Charge费用 DO
 *
 * @author 集运管理员
 */
@Data
@NoArgsConstructor
public class BlnoLocalChargeTempVO {
    /**
     * 提单号
     */
    private Long blnoId;
    /**
     * 费用代码
     */
    private String chargeCode;
    /**
     * 计费维度 C=按体积吨计费，N=按箱计费，Y=按票计费
     */
    private String per;
    /**
     * 箱型
     */
    private String cntrType;
    /**
     * 箱尺寸
     */
    private String cntrSize;
    /**
     * 货类
     */
    private String cargoType;
    /**
     * 费率
     */
    private BigDecimal rate;
    /**
     * 币种
     */
    private String currency;

    /**
     * 付费人
     */
    private String payer;

    /**
     * 费用发生港
     */
    private String localPort;
    /**
     * 进口还是出口
     */
    private String imExType;

    /**
     * 预付还是到付
     */
    private String payment;

    public BlnoLocalChargeTempVO(Long blnoId, String chargeCode, String per, String cntrType, String cntrSize, String cargoType, BigDecimal rate, String currency, String payer, String localPort, String imExType, String payment) {
        this.blnoId = blnoId;
        this.chargeCode = chargeCode;
        this.per = per;
        this.cntrType = cntrType;
        this.cntrSize = cntrSize;
        this.cargoType = cargoType;
        this.rate = rate;
        this.currency = currency;
        this.payer = payer;
        this.localPort = localPort;
        this.imExType = imExType;
        this.payment = payment;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        BlnoLocalChargeTempVO blnoLocalChargeTempVo = (BlnoLocalChargeTempVO) o;
        return Objects.equals(blnoId, blnoLocalChargeTempVo.blnoId) &&
                Objects.equals(chargeCode, blnoLocalChargeTempVo.chargeCode) &&
                Objects.equals(per, blnoLocalChargeTempVo.per) &&
                Objects.equals(cntrType, blnoLocalChargeTempVo.cntrType) &&
                Objects.equals(cntrSize, blnoLocalChargeTempVo.cntrSize) &&
                Objects.equals(cargoType, blnoLocalChargeTempVo.cargoType) &&
                Objects.equals(rate, blnoLocalChargeTempVo.rate) &&
                Objects.equals(currency, blnoLocalChargeTempVo.currency) &&
                Objects.equals(payer, blnoLocalChargeTempVo.payer) &&
                Objects.equals(localPort, blnoLocalChargeTempVo.localPort) &&
                Objects.equals(imExType, blnoLocalChargeTempVo.imExType) &&
                Objects.equals(payment, blnoLocalChargeTempVo.payment);
    }

    @Override
    public int hashCode() {
        return Objects.hash(blnoId, chargeCode, per, cntrType, cntrSize, cargoType, rate, currency, payer, localPort, imExType, payment);
    }

    @Override
    public String toString() {
        return "blnoId=" + blnoId + ", chargeCode=" + chargeCode +
                ", per=" + per + ",cntrType" + cntrType + ",cntrSize=" + cntrSize +
                ",cargoType=" + cargoType + ",rate=" + rate + ",currency=" + currency +
                ",payer=" + payer + ",localPort=" + localPort + ",imExType=" + imExType + ",payment=" + payment;
    }
}
